/************************************************************************
 * @file ConfigPanel.h
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#ifndef CONFIGPANEL_H
#define CONFIGPANEL_H

#include <pluginui/pluginui_global.h>

#include <QWidget>

namespace antu
{
namespace plugin
{
namespace ui
{
class PLUGINUISHARED_EXPORT ConfigPanel : public QWidget
{
    Q_OBJECT

public:
    ConfigPanel(QWidget* parent = nullptr);
    virtual ~ConfigPanel();

    virtual void save() const;
    virtual void load();

    bool contentHashChanged();
    void reset();

private:
    quint64 m_ulContentHash;
    bool m_bContentChanged;

protected:
    virtual quint64 computeContentHash() const = 0;

signals:
    void saved();
};
}
}
}

#endif // CONFIGPANEL_H
